package day17;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:季节
 * @date 2019/8/6 0006
 */
public enum Season {
    SPRING("春") {
        @Override
        public Season next() {
            return Season.SUMMER;
        }
    },
    SUMMER("夏") {
        @Override
        public Season next() {
            return Season.AUTUMN;
        }
    },
    AUTUMN("秋") {
        @Override
        public Season next() {
            return Season.WINTER;
        }
    },
    WINTER("冬") {
        @Override
        public Season next() {
            return Season.SPRING;
        }
    };

    private String sign;

    Season(String sign){
        this.sign = sign;
    }

    public String getSign() {
        return sign;
    }

    //抽象方法 - 但是每个枚举常量都要实现这个方法
    public abstract Season next();
}
